package collection;

import exception.CollectionEmptyException;

public class MTList<E> extends AList<E>{

	public MTList(){}
	
	@Override
	public E first() throws CollectionEmptyException 
	{
		throw new CollectionEmptyException("List");
	}

	@Override
	public IList<E> rest() throws CollectionEmptyException 
	{
		throw new CollectionEmptyException("List");
	}

	@Override
	public boolean isEmpty() 
	{
		return true;
	}

	@Override
	public String toString() {
		return "[]";
	}

	@Override
	public <T> T accept(IListVisitor<E, T> visitor) 
	{
		return visitor.visit(this);
	}
}

